﻿CREATE TABLE [dbo].[EventLog] (
    [Category]        VARCHAR (200)    NULL,
    [CategoryString]  VARCHAR (200)    NULL,
    [ComputerName]    VARCHAR (200)    NULL,
    [EventCode]       VARCHAR (100)    NOT NULL,
    [EventIdentifier] VARCHAR (100)    NOT NULL,
    [EventType]       VARCHAR (200)    NULL,
    [LogFile]         VARCHAR (100)    NULL,
    [Message]         TEXT             NULL,
    [RecordNumber]    INT              NOT NULL,
    [SourceName]      VARCHAR (200)    NULL,
    [TimeGenerated]   VARCHAR (50)     NOT NULL,
    [Type]            VARCHAR (200)    NULL,
    [User]            VARCHAR (200)    NULL,
    [ServerID]        UNIQUEIDENTIFIER NULL,
    CONSTRAINT [PK_EventLog_1] PRIMARY KEY CLUSTERED ([RecordNumber] ASC),
    CONSTRAINT [FK_EventLog_Server] FOREIGN KEY ([ServerID]) REFERENCES [dbo].[Server] ([ServerID])
);

